
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mytools;

import com.opensymphony.xwork2.ActionSupport;

/**

 *

 * @author xiaoxiao

 */
public class registerAction extends ActionSupport {

    private user register;
    private String repassword;
    private userDAO ud;

    public registerAction() throws Exception {
    }

    public String execute() throws Exception {
        ud = new userDAO();
        int i = ud.saveUser(register);
        if (i == 1) {
            return SUCCESS;
        } else {
            return ERROR;
        }
    }

    /**
     * @return the register
     */
    public user getRegister() {
        return register;
    }

    /**
     * @param register the register to set
     */
    public void setRegister(user register) {
        this.register = register;
    }

    /**
     * @return the ud
     */
    public userDAO getUd() {
        return ud;
    }

    /**
     * @param ud the ud to set
     */
    public void setUd(userDAO ud) {
        this.ud = ud;
    }

    /**
     * @return the repassword
     */
    public String getRepassword() {
        return repassword;
    }

    /**
     * @param repassword the repassword to set
     */
    public void setRepassword(String repassword) {
        this.repassword = repassword;
    }
}
